home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12704 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: druid.borland.com!usenet
  2. From: mstave@wpo.borland.com (Matt Stave)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Newbie Q, please Help
  5. Date: Thu, 21 Mar 1996 03:31:42 GMT
  6. Organization: Borland International
  7. Message-ID: <4iqiki$ecj@druid.borland.com>
  8. References: <4ii7pc$d27@news-e2c.gnn.com> <4ik6g8$14k@reader2.ix.netcom.com>
  9. NNTP-Posting-Host: mstave2.borland.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. jlilley@ix.netcom.com (John Lilley) wrote:
  13.  
  14. >In article <4ii7pc$d27@news-e2c.gnn.com>, ScottDrane@gnn.com says...
  15. >>
  16. >>     I'm getting a linker error when trying to
  17. >>compile my latest project:
  18. >>     Segment MYPROGRAM_TEXT exceeds 64K
  19.  
  20. >You didn't mention the compiler, but they all have some option
  21. >like "far data threshold" or "segment threshold", which defaults
  22. >to something like 32k.  Set this to something like 256.
  23.  
  24. >Secondly if you have any large static arrays like:
  25. >    int myData[2048];
  26. >make it explicitly far:
  27. >    int far myData[2048];
  28.  
  29. >Third, you can edit your DEF file and decrease the stack space
  30. >a bit to say, 10240, but be careful as that can cause stack
  31. >overflow problems.
  32.  
  33. >>     I tried to recompile under a different
  34. >>memory model, but the compiler told me
  35. >>Windows only works with the large model.
  36. >>Can anyone straighten me out?
  37.  
  38. >This is not true -- Windows 3.x supports tiny, medium, compact,
  39. >and large -- but "large" model is the best you can do
  40. >under Windows 3.x without resorting to "huge", which is
  41. >not supported by the standard libraries.  You could also
  42. >compile with Win32s and get a flat address space; that's
  43. >somewhat involved but may be worth it if the above does not help.
  44.  
  45. >john lilley
  46.  
  47. Segments with _TEXT in their names are usually code segments.   You
  48. need to break your code into smaller pieces.  This is accomplished in
  49. different ways with different compilers.  One thing that may help
  50. regardless is to break up your source files into more, smaller files.
  51. Is there a source file that corresponds to the error message, i.e.
  52. zoooma.cpp and ZOOMA_TEXT?  If so, it's a prime candidate for
  53. demolition....
  54.  
  55. --- Matt
  56.  
  57.